#include "agentprotocol.h"

AgentProtocol::AgentProtocol(QObject *parent) :
    QObject(parent)
{
    baITOVersion="IOT/3.2";
    structReplyStatus.baBadRequest="04 Bad Request";
    structReplyStatus.baNoResponse="05 No Response";
    structReplyStatus.baNotImplemented="07 Not Implemented";
    structReplyStatus.baOK="01 OK";
    structReplyStatus.baNotFound="03 Not Found";


}

QByteArray AgentProtocol::replyLineBadRequest()
{
    return "AgentReply "+baITOVersion+" "+
            structReplyStatus.baBadRequest;
}

QByteArray AgentProtocol::replyLineNoResponse()
{
    return "AgentReply "+baITOVersion+" "+
            structReplyStatus.baNoResponse;
}

QByteArray AgentProtocol::replyLineNotImplemented()
{
    return "AgentReply "+baITOVersion+" "+
            structReplyStatus.baNotImplemented;
}

QByteArray AgentProtocol::replyLineNotFound()
{
    return "AgentReply "+baITOVersion+" "+
            structReplyStatus.baNotFound;
}

QByteArray AgentProtocol::replyLineOK()
{
    return "AgentReply "+baITOVersion+" "+
            structReplyStatus.baOK;
}
